package com.big.app.controller;

import com.big.app.entity.Flower;
import com.big.app.service.intf.FlowerService;
import com.big.app.vo1.R;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/flower/")
@CrossOrigin //跨域
@Api(value = "实现鲜花相关操作",tags = "实现鲜花相关操作")
public class FlowerController {
    @Autowired
    private FlowerService service;
//    添加
    @PostMapping("add.do")
    public R add(Flower flower){
        return service.add(flower);
    }
//    查询
    @GetMapping("query.do")
    public R query(){
        return service.query();//flower对象集合
    }
}
